package java8.interface_new;

/**
 * Created by fangjicai on 2020/6/6.
 */
public class InterNewTest {
    public static void main(String[] args) {
        //通过匿名类实例化接口方法
      Formula formula= new Formula(){
            @Override
            public double calculate(int a) {
                return sqrt(a*100);
            }
        };
        double calculate = formula.calculate(100);
        System.out.println(calculate);
    }

}
